rialto.widgetBehavior.ReSizeMouseDownHandler= function (e){
        //----------------------------------------
                if (!e) var e = window.event;

                // test la validit? de la cible du mouse down / redimensionnement
                var oSourceEvt = e.target ? e.target: e.srcElement;
/*
                if (   (! oSourceEvt.reSize)
                    || (   oSourceEvt.refObjSpecsRS
                         && (oSourceEvt.refObjSpecsRS.oCiu['ReSize'].lockReSize)))
                         
                   return;
*/                   
                 var oHtml = oSourceEvt;

				if (!oHtml.reSize){
					//alert('resize non actif'+oHtml.id);
					return;
				}
//alert('RS oHtml.id = '+oHtml.id);					

                // oHtml mono-directionnel , direction predetermin?e
                var direction;
                if (oHtml.modeRS != 'mono'){
                    direction  = oHtml.dirRS;
                }

                // oHtml a sensibilite variable et direction = fct(position)
                else {
                    direction = DirDeplact(oHtml, e, pixHeight(oHtml), pixWidth(oHtml)
                                           ,oHtml.refObjSpecsRS.specsRS.sensitiveEdgeWidth
                                           ,marginLess=false);
                }

                // zone d'exclusion / reSize = center
               if (! direction)  {
               traceExec('position invalide/RS',58);
                   oHtml.style.cursor = "default";
                   return;
               }
               else
                   oHtml.style.cursor = direction + "-resize";

				// DD in progress ?
				if (	(oHtml.behavior['DD'])
					&&	(oHtml.behavior['DD'].isRunning)){
						return;
				}
				else
					oHtml.behavior['RS'].isRunning = true;
               traceExec('position valide/RS',58);

   // blocage DD
/*   if (oHtml.oCiu['DragAndDrop']) {
//     oHtml.oCiu['DragAndDrop'].svgDragAndDrop = oHtml.oCiu['DragAndDrop'].dragAndDrop;
//     oHtml.oCiu['DragAndDrop'].dragAndDrop = false;
     oHtml.svgDragAndDrop = oHtml.dragAndDrop;
     oHtml.dragAndDrop = false;
     //traceAct3('blocage DD id=',oHtml.id);
   }
*/

                // recup objet detenant les specs du RS
                var oSpecs = oHtml.refObjSpecsRS;
              
//               traceExec('Md contenuFenetre.height= '+oSpecs.oCiu.contenuFenetre.style.height,60);

                // chargement des limites s'il y a lieu
                if (oSpecs.specsRS.majDyn)
                   oSpecs.loadLimitsDynRS(oSpecs.specsRS.objetADeformer.parentNode);          // modif du 23/12/2003

                // objet Html ? deplacer in fine
                var objetADeformer =  oSpecs.specsRS.objetADeformer;
              
traceExec(';;;Md objetADeformer.style.height= ' + parseInt(objetADeformer.style.height),60);

                // objet Html en deplact pdt le RS
                //  soit un cadre fantome mobile
                if (oSpecs.specsRS.fantome){
                  var cadreFantome = document.getElementById('cadreFantomeUnique');
                  if (cadreFantome == null) {
                    cadreFantome = document.createElement('DIV');
                    cadreFantome.id = 'cadreFantomeUnique';
                    cadreFantome.className = 'fantomeRS_' + oSpecs.specsRS.fantome.aspect; //'cadreDeplactFenetreMobile';
                    objetADeformer.parentNode.appendChild(cadreFantome);
                  }
                  else
                  if (cadreFantome.parentNode != objetADeformer) {
                    cadreFantome.parentNode.removeChild(cadreFantome);
                    cadreFantome = document.createElement('DIV');
                    cadreFantome.id = 'cadreFantomeUnique';
                    cadreFantome.className = 'fantomeRS_' + oSpecs.specsRS.fantome.aspect; //'cadreDeplactFenetreMobile';
                    objetADeformer.parentNode.appendChild(cadreFantome);
                  }

                  cadreFantome.style.zIndex = 100000;

                  cadreFantome.style.top    = pixTop(objetADeformer);
                  cadreFantome.style.left   = pixLeft(objetADeformer);
                  cadreFantome.style.width  = pixWidth(objetADeformer);

                      // sous Moz la bordure n est pas compt?e ds width il faut la soustraire pour ne pas provoquer d ascenceur
                      // ds la div container de fantome
                      // ancienne assertion fausse :
                      // sous IE c est inutile la bordure etant comprise ds width , mais comme borderTopWidth n existe pas sous IE
                      // et que l argt '0' permet ? getComputStyle de ramener 0 l appel peut se faire ss dommage mm ds ce cadre
                  var bWidth = 0;
                  if (window.getComputedStyle) {
                    var topWidthBord = getComputStyle(cadreFantome,'borderTopWidth','0');
                    var bottomWidthBord = getComputStyle(cadreFantome,'borderBottomWidth','0');
                    if (  topWidthBord  || bottomWidthBord){
                      bWidth =     topWidthBord  + bottomWidthBord;
                      cadreFantome.style.width = parseInt(cadreFantome.style.width) - bWidth;
                    }
/* ou bien :
                  if (getComputStyleStr(cadreFantome,'borderStyle') != 'none'){
                      var bWidth =         getComputStyle(cadreFantome,'borderTopWidth','0')
                                       +   getComputStyle(cadreFantome,'borderBottomWidth','0');
                      cadreFantome.style.width = parseInt(cadreFantome.style.width) - bWidth;
                  }
*/
                  }
traceExec('!!! objetADeformer.id= '+objetADeformer.id,60);
                  cadreFantome.style.height = pixHeight(objetADeformer);
                  traceExec('RS -1- Md cadreFantome.style.height = pixHeight(objetADeformer)= '+pixHeight(objetADeformer),75);
                  traceExec('!!! Md cadreFantome.style.height= '+cadreFantome.style.height,60);
                  var bHeight = 0;
                  // a revoir : meme traitement que pour width necessaire ?
                  if (window.getComputedStyle) {
                      bHeight =     topWidthBord  + bottomWidthBord;
//                      alert( 'bHeight= '+bHeight );
                      cadreFantome.style.height = parseInt(cadreFantome.style.height) - bHeight;
                  }

                  cadreFantome.style.visibility = 'visible';

                  var objetEnDeformation = cadreFantome;
                  objetEnDeformation.refObjSpecs = oSpecs;  // pour Moz en mode fantome
                }
                // soit directement l element ? deplacer
                else
                  var objetEnDeformation = objetADeformer;

                var top    = pixTop(objetEnDeformation);
                var left   = pixLeft(objetEnDeformation);
                var width  = pixWidth(objetEnDeformation);
                var height = pixHeight(objetEnDeformation);
                traceExec('++++Md  height obj en def= '+height,58);

			  // initial (MD)position of cursor in viewPort
			  var topLeftEvtInVP  = _rum.$eventTopLeftInViewPort(e);
			  var topEvtInVP  	  = topLeftEvtInVP.top;
			  var leftEvtInVP 	  = topLeftEvtInVP.left;

                oReSize = {oThis          : oSpecs,
                            oSource        : oHtml,
                            fantome        : oSpecs.specsRS.fantome,
                            objetEnDeformation : objetEnDeformation,
                            objetADeformer : objetADeformer,
                            limitReDim   : oSpecs.limitReDim,
                            direction      :  direction,
                            clientXI       :  e.clientX,
                            clientYI       :  e.clientY,
                            topI           : top,
                            leftI           :left,
                            widthI         : width,
                            wBordGD        : bWidth,
                            wBordHB        : bHeight,
                            heightI        : height,

                            magnet         : oSpecs.specsRS.magnet,

                            mvtEffectif     : false,

						    // initial (MD) position of cursor, in viewPort
						    topEvtInVP  	: topEvtInVP,
						    leftEvtInVP		: leftEvtInVP 	  
                            };
      oReSize.prevTop    = parseInt(oReSize.objetEnDeformation.style.top);
      oReSize.prevLeft   = parseInt(oReSize.objetEnDeformation.style.left);
      oReSize.prevWidth  = parseInt(oReSize.objetEnDeformation.style.width);
      oReSize.prevHeight = parseInt(oReSize.objetEnDeformation.style.height);
      
                traceExec('RS -0- objetEnDeformation.style.height= '+objetEnDeformation.style.height,75);
                traceExec('RS -0- heightI = pixHeight(objetEnDeformation)= '+oReSize.heightI,75);
                traceExec('RS -0- objetADeformer.style.height= '+objetADeformer.style.height,75);

traceExec('Md oReSize.objetEnDeformation.style.height= ' + parseInt(oReSize.objetEnDeformation.style.height),62);
traceExec('Md oReSize.objetADeformer.style.height=     ' + pixHeight(oReSize.objetADeformer)    ,62);
                if ( this.setCapture) {
                   this.setCapture();
                   stopEvent(e);
                   if (   (!oSpecs.specsRS.modCurs.avantDD)
                       && (oSpecs.specsRS.modCurs.auClic)) {
                    // DragAndDrop.modCurseur(oHtml,direction,oSpecs.limitDeplact.orientation);
                      rialto.widgetBehavior.DDmodCursor(oHtml,direction,oSpecs.limitDeplact.orientation);
                   }
                }
                else
                   if (   (!oSpecs.specsRS.modCurs.avantDD)
                       && (oSpecs.specsRS.modCurs.auClic)) {
                    if (oSpecs.specsRS.fantome)
                        // DragAndDrop.modCurseur(objetEnDeplact,direction,oSpecs.limitDeplact.orientation);
						rialto.widgetBehavior.DDmodCursor(objetEnDeplact,direction,oSpecs.limitDeplact.orientation);
                    else
                        // DragAndDrop.modCurseur(oHtml,direction,oSpecs.limitDeplact.orientation);
						rialto.widgetBehavior.DDmodCursor(oHtml,direction,oSpecs.limitDeplact.orientation);
                   }

//              stopEvent();
        }


rialto.widgetBehavior.ReSizeMouseMoveHandler = function (e){
//----------------------------------
if (!e) var e = window.event;

var oHtml = e.target        ? e.target        : e.srcElement;

// resize not beginning
// display possibility with cursor variant
if (!oReSize){
/*
   if (oHtml.oCiu['DragAndDrop']  && oHtml.oCiu['DragAndDrop'].dsChampMm){
		oHtml.oCiu['DragAndDrop'].dsChampMm = false;
		return;
   }
*/
/*   if (    (!oHtml.reSize)
        || (	oHtml.refObjSpecsRS
            &&	(oHtml.refObjSpecsRS.oCiu['ReSize'].lockReSize))) {
//      traceExec('move hors reSize sur oHtml.id='+oHtml.id,61);
		oHtml.style.cursor = "default";         // ajout 9/10/03
		return;
   }
*/

   if (oHtml.reSize){
//      traceExec('move sur reSize oHtml.id= '+oHtml.id,61);
		//oHtml monolithique , direction predetermin?e
        var direction;
        // multi-blocs with one orientation / Html block 
        if (oHtml.modeRS != 'mono'){
            direction  = oHtml.dirRS;
        }

        // the resize orientation depend of the cursor position in margins oHtml
        else {
        traceExec('MM oHtml.margeSensible= '+oHtml.margeSensible+' defMargeSensibleDD= '+
        defMargeSensibleDD+' oHtml.refObjSpecsRS.sensitiveEdgeWidth= '+
        oHtml.refObjSpecsRS.specsRS.sensitiveEdgeWidth,74);
traceExec('RS MM b',74);
            direction = DirDeplact(oHtml, e, pixHeight(oHtml), pixWidth(oHtml)
                                           ,oHtml.refObjSpecsRS.specsRS.sensitiveEdgeWidth
                                           ,marginExcluded = false);
traceExec('RS MM e',74);
        }
 /* fl prov */     
        if (direction == ""){
//          // oHtml.style.cursor = svgCursor;
//            oHtml.style.cursor = "default";
            traceExec('RS mm ap DirDeplact dir='+direction+' curs def restor?',74);
            //oHtml.oCiu['ReSize'].dsChampMm = false;
        }
        else{
            oHtml.style.cursor = direction + "-resize";
            traceExec('RS mm ap DirDeplact dir='+direction+' curs ad hoc',74);
            //oHtml.oCiu['ReSize'].dsChampMm = true;
        }
/**/
    }
}

// resize in progress
else{
      if (e.clientX >= 0  &&  e.clientY >= 0){
         oReSize.mvtEffectif = true;


        // positions sans mouvement
        var nvTop    = parseInt(oReSize.objetEnDeformation.style.top);
        var nvLeft   = parseInt(oReSize.objetEnDeformation.style.left);
        var nvWidth  = parseInt(oReSize.objetEnDeformation.style.width);
//        var nvHeight = parseInt(oReSize.objetEnDeformation.style.height);
        var nvHeight = pixHeight(oReSize.objetEnDeformation);
 traceExec('Mm (oReSize.objetEnDeformation.id= '+oReSize.objetEnDeformation.id,60);
 traceExec('Mm dim ss mvt height= '+nvHeight,60);




	    var nvEventTopLeft   = _rum.$eventTopLeftInViewPort(e);
		var totDeltaMoveY = nvEventTopLeft.top  - oReSize.topEvtInVP;
		var totDeltaMoveX = nvEventTopLeft.left - oReSize.leftEvtInVP;




          // attention direction ne signifie pas direction ! mais pr?cise le bord de la div utilis? pour le RS
          //a revoir ...
        var direction = oReSize.direction;

        // calcul des variations sans contraintes
        //----------------------------------------

        //---- double symetrie
        if (oReSize.limitReDim.dbleSymetrie){

        }
        else
        //---- pas de mouvement symetrique
        if (!oReSize.limitReDim.symetrie){
          if (direction.indexOf('e')!=-1){
            nvWidth = oReSize.widthI + totDeltaMoveX; //(e.clientX - oReSize.clientXI);
          }
          else
          if (direction.indexOf('w')!=-1){
            nvLeft  = oReSize.leftI + totDeltaMoveX; //(e.clientX - oReSize.clientXI);
            nvWidth = oReSize.widthI - totDeltaMoveX; //(e.clientX - oReSize.clientXI);
          }

          if (direction.indexOf('s')!=-1){
            nvHeight = oReSize.heightI + totDeltaMoveY; //(e.clientY - oReSize.clientYI);
          }
          else if (direction.indexOf('n')!=-1){
            nvTop    = oReSize.topI    + totDeltaMoveY; //(e.clientY - oReSize.clientYI);
            nvHeight = oReSize.heightI - totDeltaMoveY; //(e.clientY - oReSize.clientYI);
          }

        }

        //---- mouvement symetrique
        else {
          var diff;
          if (direction.indexOf('n')!=-1){
            nvTop = oReSize.topI + totDeltaMoveY; //(e.clientY - oReSize.clientYI);
            nvHeight = oReSize.heightI - 2 * totDeltaMoveY; //(e.clientY - oReSize.clientYI);
              if (oReSize.limitReDim.symetrie == 'radiale'){
               diff = (e.clientY - oReSize.clientYI);
               nvLeft = oReSize.leftI + diff;
               nvWidth = oReSize.widthI - 2 * diff;
              }
          }
          else if (direction.indexOf('s')!=-1) {
            nvTop = oReSize.topI - totDeltaMoveY; //(e.clientY - oReSize.clientYI);
            nvHeight = oReSize.heightI + 2 * totDeltaMoveY; //(e.clientY - oReSize.clientYI);

              if (oReSize.limitReDim.symetrie == 'radiale'){
              diff = totDeltaMoveY; //(e.clientY - oReSize.clientYI);
              nvLeft = oReSize.leftI - diff;
              nvWidth = oReSize.widthI + 2* diff;
              }
          }
          if (direction.indexOf('w')!=-1) {
            nvLeft = oReSize.leftI + totDeltaMoveX; //(e.clientX - oReSize.clientXI);
            nvWidth = oReSize.widthI - 2 * totDeltaMoveX; //(e.clientX - oReSize.clientXI);

              if (oReSize.limitReDim.symetrie == 'radiale'){
              diff = totDeltaMoveX; //(e.clientX - oReSize.clientXI);
              nvTop = oReSize.topI + diff;
              nvHeight = oReSize.heightI - 2 * diff;
              }
          }
          else if (direction.indexOf('e')!=-1) {
            nvLeft = oReSize.leftI - totDeltaMoveX; //(e.clientX - oReSize.clientXI);
            nvWidth = oReSize.widthI + 2* totDeltaMoveX; //(e.clientX - oReSize.clientXI);

              if (oReSize.limitReDim.symetrie == 'radiale'){
              diff = totDeltaMoveX; //(e.clientX - oReSize.clientXI);
              nvTop = oReSize.topI - diff;
              nvHeight = oReSize.heightI + 2 * diff;
              }
          }
        }
 traceExec('Mm av contraintes nvHeight = '+nvHeight+' nvWidth= '+ nvWidth+' nvLeft= '+ nvLeft,58);

        //  prise en compte des contraintes
        //---------------------------------
if (oReSize.limitReDim.bRectLim)
{
        var rectLim = oReSize.limitReDim.rectLim;
        var lim = oReSize.limitReDim;

traceExec('Mm rectLim left = '+rectLim.left+' right= '+ rectLim.right+' lim.widthMax= '+lim.widthMax
+ ' lim.widthMin= '+lim.widthMin,58);

        //---- mouvement asymetrique
        if (!lim.symetrie){
          // contraintes est-ouest

          if (nvWidth > lim.widthMax) {
           nvWidth = lim.widthMax;
           if (direction == 'w')   // sensDeplact == 'e'
             nvLeft =  (oReSize.leftI + oReSize.widthI - 1 )  - lim.widthMax + 1;
             traceExec('contrainte 1');
          }

		//          if  (   lim.bRectLim
          if  (   (rectLim.left != undefined)
               && (nvLeft < rectLim.left)) {
           nvWidth = nvWidth - (rectLim.left - nvLeft);
           nvLeft = rectLim.left;
             traceExec('contrainte 2');
          }

          else
		//          if  (   lim.bRectLim
          if  (   (rectLim.right != undefined)
               && ((nvWidth + nvLeft - 1) > rectLim.right)) {
           nvWidth = rectLim.right - oReSize.leftI + 1;
             traceExec('contrainte 3');
          }

          else
          if (nvWidth < lim.widthMin){
           nvWidth = lim.widthMin;
             traceExec('contrainte 4 nvWidth = '+nvWidth+' lim.widthMin= '+lim.widthMin,58);

          //if (direction == 'w')   // sensDeplact == 'e'
           if (direction.indexOf('w')!=-1)
             nvLeft =  (oReSize.leftI + oReSize.widthI - 1 )  - lim.widthMin + 1;
          }

          // contraintes nord-sud
          if (nvHeight > lim.heightMax){
			traceExec('Mm (nvHeight > lim.heightMax) nvHeight= '+nvHeight+' lim.heightMax= '+lim.heightMax,60);
           nvHeight = lim.heightMax;
           if (direction.indexOf('n')!=-1)
			//           if (direction == 'n')
             nvTop =  (oReSize.topI + oReSize.heightI - 1 )  - lim.heightMax + 1;
             traceExec('contrainte 5');
          }

			//           traceExec('>>>>> as contrainte 4: oReSize.limitReDim.bRectLim='+lim.bRectLim,30);
			//          if (   lim.bRectLim
          if (   (rectLim.top != undefined)
              && (nvTop < rectLim.top)) {
			traceExec('Mm (nvTop < rectLim.top) nvHeight= '+nvHeight+' rectLim.top= '+rectLim.top+' nvTop= '+nvTop,60);
           nvHeight = nvHeight - (rectLim.top - nvTop);
           nvTop = rectLim.top;
             traceExec('contrainte 6');
          }
          else
//          if (   lim.bRectLim
          if (   (rectLim.bottom != undefined)
              && ((nvHeight + nvTop - 1) > rectLim.bottom)) {
			traceExec('Mm (nvHeight + nvTop - 1) > rectLim.bottom) nvHeight= '+nvHeight+' rectLim.bottom= '+rectLim.bottom+' TopI= '+oReSize.topI,60);
           nvHeight = rectLim.bottom - oReSize.topI + 1;
             traceExec('contrainte 7');
          }
          else
          if (nvHeight < lim.heightMin){
			traceExec('Mm (nvHeight < lim.heightMin) nvHeight= '+nvHeight+' lim.heightMin= '+lim.heightMin,60);
           nvHeight = lim.heightMin;
		//           if (direction == 'n') // position nord
           if (direction.indexOf('n')!=-1)
             nvTop =  (oReSize.topI + oReSize.heightI - 1) - lim.heightMin + 1;
             traceExec('contrainte 8');
          }

        }

        //--- mvt symetrique
        else {

         // contraintes est-ouest
         if (nvWidth > lim.widthMax){
           nvWidth = lim.widthMax;
           nvLeft  = oReSize.leftI - ((lim.widthMax - oReSize.widthI) / 2 ) + 1;
         }

         //if ( oReSize.limitReDim.bRectLim
         if (  (rectLim.left != undefined)
            && (nvLeft < rectLim.left)){
           nvWidth = nvWidth - 2 * (rectLim.left - nvLeft);
           nvLeft = rectLim.left;
         }
		//         if (  lim.bRectLim
         if (  (rectLim.right != undefined)
            && ((nvWidth + nvLeft -1) > rectLim.right) ){
            var tropW =  (nvWidth + nvLeft - 1) - rectLim.right;
            nvWidth = nvWidth - 2 * tropW;
            nvLeft  = nvLeft + tropW - 1;
         }
         if (nvWidth < lim.widthMin){
            var manqueW = lim.widthMin - nvWidth;
            nvWidth = nvWidth + manqueW;
            nvLeft =  nvLeft - 0.5 * manqueW;
         }

         //contraintes nord-sud
         if (nvHeight > lim.heightMax){
           nvHeight = lim.heightMax;
           nvTop  = oReSize.topI - ((lim.heightMax - oReSize.heightI) / 2 ) + 1;
           traceExec('Mm sym contrainte 1');
         }

		//         if (   lim.bRectLim
         if (   (rectLim.top != undefined)
             && (nvTop < rectLim.top) ){
             traceExec('Mm sym ctr 2 nvHeight= '+nvHeight+' rectLim.top= '+rectLim.top+'  nvTop= '+nvTop,60); 
           nvHeight = nvHeight - 2 * (rectLim.top - nvTop);
           nvTop = rectLim.top;
           traceExec('Mm sym contrainte 2',60);
         }

		//         if (   lim.bRectLim
         if (   (rectLim.bottom != undefined)
             && ((nvHeight + nvTop - 1) > rectLim.bottom) ){
           var tropH = (nvHeight + nvTop - 1) - rectLim.bottom;
           nvHeight = nvHeight - 2 * tropH ;
           nvTop = nvTop + tropH - 1;
           traceExec('Mm sym contrainte 3');
         }

         if (nvHeight < lim.heightMin){
            var manqueH = lim.heightMin - nvHeight;
            nvHeight = nvHeight + manqueH;
            nvTop =  nvTop - 0.5 * manqueH;
           traceExec('Mm sym contrainte 4');
         }
        }
		traceExec('Mm ap nvHeight= contraintes'+nvHeight,60);

	}


        // effet grille magnetique (hypothese la div initiale respecte la grille en terme de position et de dimension)
        if (oReSize.magnet){
          if (!oReSize.limitReDim.symetrie){
          // prise en main nord et/ou est
           if (direction.indexOf('n')!=-1){
             var nvTopGrille =   Math.round(nvTop / oReSize.magnet.heightRow)
                             * oReSize.magnet.heightRow;
             var diffMagn = nvTop - nvTopGrille;  // > 0
             nvTop = nvTopGrille;
             nvHeight = nvHeight + diffMagn;
           }

           if (direction.indexOf('w')!=-1){
             var nvLeftGrille =      Math.round(parseInt(nvLeft) / oReSize.magnet.widthCol)
                       * oReSize.magnet.widthCol;
             diffMagn = nvLeft - nvLeftGrille;
             nvLeft = nvLeftGrille;
             nvWidth = nvWidth + diffMagn;
           }
           if (direction.indexOf('s')!=-1){
             var nvHeightGrille =      Math.round(parseInt(nvHeight) / oReSize.magnet.heightRow)
                                     * oReSize.magnet.heightRow;
             diffMagn = nvHeight - nvHeightGrille;
             nvHeight = nvHeightGrille;
           }
           if (direction.indexOf('e')!=-1){
             nvWidth =      Math.round(parseInt(nvWidth) / oReSize.magnet.widthCol)
                          * oReSize.magnet.widthCol;
           }
          }
          // avec deformation symetrique
          else{
             alert('deformation symetrique + grille magnetique non encore impl?ment?e');
          }
        }


        // application
        //------------
        oReSize.objetEnDeformation.style.top    = nvTop;
        oReSize.objetEnDeformation.style.left   = nvLeft;
        oReSize.objetEnDeformation.style.width  = nvWidth;
        oReSize.objetEnDeformation.style.height = nvHeight;

        // callBack routine for synchro
        //-----------------------------
        if (oReSize.oThis.synchroRS)
            rialto.widgetBehavior.$$RSMM_CallBackSynchro ();

      }

   }
   stopEvent(e);
}
rialto.widgetBehavior.$$RSMM_CallBackSynchro = function () {
//==========================================
	  var deltaTop    =   parseInt(oReSize.objetEnDeformation.style.top)
	  				   -  oReSize.prevTop;
	  var deltaLeft   =  parseInt(oReSize.objetEnDeformation.style.left)
	  				   - oReSize.prevLeft;
	  var deltaWidth  =  parseInt(oReSize.objetEnDeformation.style.width)
	  				   - oReSize.prevWidth;
	  var deltaHeight =  pixHeight(oReSize.objetEnDeformation)
	  				   - oReSize.prevHeight;
	  				
      //--- save present positions
      oReSize.prevTop    = parseInt(oReSize.objetEnDeformation.style.top);
      oReSize.prevLeft   = parseInt(oReSize.objetEnDeformation.style.left);
      oReSize.prevWidth  = parseInt(oReSize.objetEnDeformation.style.width);
      oReSize.prevHeight = parseInt(oReSize.objetEnDeformation.style.height);

      if (oReSize.oThis.synchroRS)
           oReSize.oThis.synchroRS({top:deltaTop,     left:deltaLeft, 
           							width:deltaWidth, height:deltaHeight});

}     

rialto.widgetBehavior.ReSizeMouseUpHandler = function (e){
         //--------------------------------
               if (!e) var e = window.event;
               if (oReSize && oReSize.objetEnDeformation){
                   if ( this.releaseCapture){
/*                     if (   (!oDeplact.oThis.specsRS.modCurs.avantDD)
                        && (oDeplact.oThis.specsRS.modCurs.auClic)) {
                          this.style.cursor = 'default';
                          traceExec('supp cursor',30);
                     }
*/
                     this.releaseCapture();
                   }
                   else{
                   if (oReSize.fantome)
                     oReSize.objetEnDeformation.style.cursor = 'default';
                   else
                     oReSize.oSource.style.cursor = 'default';
                   }

					// unlock DD
					oReSize.oSource.behavior['RS'].isRunning = false;
						

                   var oThis = oReSize.oThis;
                   // calcul des variations seult si passage fcts callbacks
                   if (oThis.afterRS){
                     // objet ? deformer in fine non encore deform?
                     if (oReSize.objetADeformer != oReSize.objetEnDeformation) {
                       var deltaTop =   parseInt(oReSize.objetEnDeformation.style.top)
                                    - parseInt(oReSize.objetADeformer.style.top) ;
                       var deltaLeft = parseInt(oReSize.objetEnDeformation.style.left)
                                     - parseInt(oReSize.objetADeformer.style.left);
                       var deltaWidth = parseInt(oReSize.objetEnDeformation.style.width)
                                   - parseInt(oReSize.objetADeformer.style.width) + oReSize.wBordGD;
traceExec('oReSize.objetEnDeformation.style.height= ' + parseInt(oReSize.objetEnDeformation.style.height),60);
traceExec('oReSize.objetADeformer.style.height=     ' + pixHeight(oReSize.objetADeformer)    ,60);
                       var deltaHeight = parseInt(oReSize.objetEnDeformation.style.height)
                                     - pixHeight(oReSize.objetADeformer) + oReSize.wBordHB;
//                                     - parseInt(oReSize.objetADeformer.style.height) + oReSize.wBordHB;
                       traceExec('RS -3- Mup  afterRs existe deltaHeight = parseInt(oReSize.objetEnDeformation.style.height)- pixHeight(oReSize.objetADeformer) + oReSize.wBordHB= '+deltaHeight,75);
traceExec('______deltaHeight= '+deltaHeight,62);
                     }
                     // deformation directe : ref aux dims initiales
                     else{
                       var deltaTop =   parseInt(oReSize.objetEnDeformation.style.top)
                                      - parseInt(oReSize.topI);
                       var deltaLeft =  parseInt(oReSize.objetEnDeformation.style.left)
                                      - parseInt(oReSize.leftI);
                       var deltaWidth =  parseInt(oReSize.objetEnDeformation.style.width)
                                       - parseInt(oReSize.widthI);
                       var deltaHeight =  parseInt(oReSize.objetEnDeformation.style.height)
                                        - parseInt(oReSize.heightI);
                       traceExec('RS -4- Mup pas de afterRs deltaHeight = parseInt(oReSize.objetEnDeformation.style.height)- parseInt(oReSize.heightI)= '+deltaHeight,75);
                     }
                   }

                   if (oReSize.objetADeformer != oReSize.objetEnDeformation){

                     oReSize.objetADeformer.style.top    = oReSize.objetEnDeformation.style.top;
                     oReSize.objetADeformer.style.left   = oReSize.objetEnDeformation.style.left;
                     oReSize.objetADeformer.style.width  = parseInt(oReSize.objetEnDeformation.style.width) + oReSize.wBordGD;

/*
                     if (deltaWidth < 0)
                       oThis.oCiu.containerHtml.style.width = 300;
*/

//ds le contexte de la gestion de fenetre
//  l instruction suivante modifie directement la hauteur de cadreFenetre
// ceci peut ?tre contradictoire avec 1 certain mode de gestion des fenetres ds lequel seul contenuFenetre voit sa taille modifi?e
// en tout ?tat de cause dans le mode susdit cette instruction est superf?tatoire (mais a des cons?quences car cette dimension
// passe ainsi d' automatique ? fix?e)').
// ajout de commentaire : idem pour l instruction pr?c?dente
                     oReSize.objetADeformer.style.height = parseInt(oReSize.objetEnDeformation.style.height) + oReSize.wBordHB;
                     traceExec('RS -5- Mup oReSize.objetADeformer.id= '+oReSize.objetADeformer.id
                     +' oReSize.objetADeformer.style.height = parseInt(oReSize.objetEnDeformation.style.height) + oReSize.wBordHB='+oReSize.objetADeformer.style.height,1);
                   }

                   if (oReSize.fantome)
                     oReSize.objetEnDeformation.style.visibility = 'hidden';

                    if (oReSize.mvtEffectif) {
                     if (oThis.afterRS)
                       oThis.afterRS({top:deltaTop, left:deltaLeft, width:deltaWidth, height:deltaHeight});
                   }
                   else {
                     if (oThis.afterClic)
                       oThis.afterClic();
                   }

                   oReSize = null;
                   stopEvent(e);
               }
          }


rialto.widgetBehavior.ReSize.modCurseur = function (oHtml, direction, orientation){
//=======================================
                         if (direction == ""){
// ne fctionne pas le curseur peut correspondre au passage precdt ds la zone sensible
//                            oHtml.style.cursor = oHtml.svgCursor;
                            oHtml.style.cursor = "default";
//                            oHtml.oCiu['DragAndDrop'].dsChampMm = false;
                         }
                         else
                         if (orientation == 'v')         //oSpecs.limitDeplact.
                           {oHtml.style.cursor = direction + "-resize";
//                            traceExec('DD mm ds champ dir='+direction,12);
//                            oHtml.oCiu['DragAndDrop'].dsChampMm = true;
                         }

                         else
                         if (orientation == 'h'){
                           oHtml.style.cursor = direction + "-resize";
//                            traceExec('DD mm ds champ dir='+direction,12);
//                            oHtml.oCiu['DragAndDrop'].dsChampMm = true;
                         }

                         else{
                           oHtml.style.cursor = 'move';
//                            traceExec('DD mm ds champ dir='+direction,12);
//                            oHtml.oCiu['DragAndDrop'].dsChampMm = true;
                         }
}
